type per = {
    name: string,
    friend?: {
        name: string,
        age?: number
    }
}
let obj: per = {
    name: 'jack',
    friend: {
        name: 'mail'
    }
}

console.log(obj.name);
console.log(obj.friend?.name);
console.log(obj.friend?.age);


export { }